using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Caramel
{
	public class ReadOnlySource<T> : Decorator<ISource<T>>, ISource<T>
	{
		public ReadOnlySource(ISource<T> target)
			: base(target)
		{
		}

		#region ISource<T> Members

		public T Value
		{
			get
			{
				return this.Target.Value;
			}
			set
			{
				throw new NotSupportedException("Source is read-only.");
			}
		}

		#endregion
	}
}
